1. Technical Field
This invention generally relates to computer systems, and more specifically relates to database constraints.
2. Background Art
Since the dawn of the computer age, computers have evolved and become more and more powerful. In our present day, computers have become indispensable in many fields of human endeavor including engineering design, machine and process control, information storage and retrieval, and office computing. One of the primary uses of computers is for information storage and retrieval.
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Database constraints are known in the art, and are used to limit data that may be entered into a database column. For example, a range constraint for a column that includes the age of people may have a range constraint that limits the entries to integer values from 1 to 99. If someone tries to enter a negative number, or zero, or 110, the database manager will detect that the data specified for the age column does not satisfy the limits specified in the range constraint for the age column. In this manner, data may be limited to expected ranges.
Known range constraints are static. Fixed numerical limits are selected (e.g., 1-99 in the example above). If the numerical limits for a range constraint need to be changed later on, the database administrator will have to manually change the limits as required. In many database systems, the natural evolution of the database requires manual adjustment of the fixed numerical limits for range constraints. For example, if a database table specifies a price range today, that same price range will likely need to be higher ten years from now, or even next year. Without a way for limits of range constraints to be adjusted based on data in the database table, the computer industry will continue to suffer the high overhead of having a database administrator change each fixed limit for range constraints that needs to be changed.